package cc.linker.steplink.crm.dao;

import cc.linker.steplink.crm.domain.ArticleData;
import cc.linker.steplink.crm.domain.Customer;
import cc.linker.steplink.crm.domain.CustomerScoreLog;
import cc.linker.steplink.crm.domain.ShareArticleLog;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface ArticleDataDao {

    List<Map> getDataById(String id);

    List<Map> getLogById(String id);

    List<Map> listData(String orgId);

    List<Map> getLogByCustomerId(Map<String, Object> map);

    ArticleData listArticleDataByAidAndType(@Param("aid") String aid, @Param("yesterday") String yesterday,
                                            @Param("readPeople") String readPeople);

    Integer insertShareArticleLogBatch(List<ShareArticleLog> articleLogs);
    
    List<ShareArticleLog> listLogByOrgId(@Param("orgId") String orgId, @Param("yesterday") String yesterday);

    Integer updateCustomerScoreBatch(List<Customer> updateCustomers);

    Integer insertCustomerScoreLogBatch(List<CustomerScoreLog> scoreLogs);
}
